function valentinesRose0
% 绘制玫瑰花
x=linspace(0,1,300);
theta=linspace(-2*pi,15*pi,300);
[x,theta]=meshgrid(x,theta);
phi=(pi/2).*exp(-theta./8./pi);
X=1-.5.*(1.25.*(1-mod(3.6.*theta,2*pi)./pi).^2-1/4).^2;
y=1.95653.*x.^2.*(1.27689.*x-1).^2.*sin(phi);
r=X.*(x.*sin(phi)+y.*cos(phi));
roseHdl=surf(r.*cos(theta),r.*sin(theta),X.*(x.*cos(phi)-y.*sin(phi)),'EdgeColor','none');

% 坐标区域修饰
ax=gca;hold on;grid on;
axis([-1,1,-1,1,-.5,1])
ax.FontName='Cambria';
ax.LineWidth=1;
ax.GridLineStyle='-.';
ax.Projection='perspective';
ax.XMinorTick='on';
ax.YMinorTick='on';
ax.ZMinorTick='on';

% 循环绘图旋转起来
while true
    theta=theta+.01;
    roseHdl.XData=r.*cos(theta);
    roseHdl.YData=r.*sin(theta);
    pause(.01),drawnow
end
end